import request from "@/utils/request";

export function getResourceTypeFieldByName(resourceTypeName) {
  return request({
    url:
      "/resourcevisualization/resource/getResourceTypeFieldByName/" +
      resourceTypeName,
    method: "get",
  });
}

export function addResourceTypeField(data) {
  return request({
    url: "/resourcevisualization/resource/addResourceTypeField",
    method: "post",
    data,
  });
}

export function addResourceTypeFieldList(data) {
  return request({
    url: "/resourcevisualization/resource/addResourceTypeFieldList",
    method: "post",
    data,
  });
}

export function deleteResourceTypeFieldByFieldId(data) {
  return request({
    url:
      "/resourcevisualization/resource/deleteResourceTypeFieldByFieldId?fieldId=" +
      data,
    method: "post",
  });
}

export function updateResourceTyprFieldByFieldId(data) {
  return request({
    url: "/resourcevisualization/resource/updateResourceTyprFieldByFieldId",
    method: "post",
    data,
  });
}

export function getResourceTypeFieldByFieldId(data) {
  return request({
    url:
      "/resourcevisualization/resource/getResourceTypeFieldByFieldId/" + data,
    method: "get",
  });
}
